<template>
  <div class="app-container">
    <!-- 头部 -->
    <div class="ProductionDynamicHeader">
      <Find :OriginalFilter="{ static: true }" :formList="formList" @findClicked="findData" />
    </div>

    <el-card style="margin-top: 5px">
      <div style="display: flex">
        <div style="width: 30%">
          <span style="font-weight: 600">生产动态查询</span>
          <Table :tableHeader="tableHeader" :tableData="tableData" :TableHeight="120" />
        </div>
        <div style="width: 30%; margin-left: 20px">
          <Table :tableHeader="tableHeader1" :tableData="tableData" :TableHeight="120" />
        </div>
        <div style="width: 40%; margin-left: 20px">
          <Table :tableHeader="tableHeader2" :tableData="tableData" :TableHeight="120" />
        </div>
      </div>
      <div style="float: right">
        <el-button class="save" type="primary" size="default" @click="">保存</el-button>
        <el-button type="primary" size="default" @click="">打印</el-button>
      </div>
    </el-card>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'ProductionDynamicAnalysisKl'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
import Find from '@/components/Find/index.vue'
const formList = ref([
  {
    type: 'date',
    dateLabel: '日期',
    dateValue: ''
  },
  {
    type: 'button',
    checkboxLabel: '生产动态表'
  },
  {
    type: 'input',
    inputLabel: '核算日期',
    inputDisabled: true,
    inputValue: '颜色/景色'
  },
  {
    type: 'input',
    inputPlaceholder: '请输入指令',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入型体',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入客户',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入颜色',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '线别',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      },
      {
        optionKey: '2',
        optionValue: '222222',
        optionLabel: 'option2'
      },
      {
        optionKey: '3',
        optionValue: '333333',
        optionLabel: 'option3'
      }
    ]
  },
  {
    type: 'date',
    dateLabel: '交期',
    dateValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入客人货号',
    inputValue: ''
  },
  {
    type: 'checkbox',
    checkboxLabel: '已结束',
    checked: false
  },
  {
    type: 'checkbox',
    checkboxLabel: '未结束',
    checked: false
  },
  {
    type: 'checkbox',
    checkboxLabel: '全部',
    checked: false
  },
  {
    type: 'button',
    checkboxLabel: '导出生产动态表'
  },
  {
    type: 'button',
    checkboxLabel: '导出生产周期表'
  },
  {
    type: 'button',
    checkboxLabel: '时辰门槛定义'
  },
  {
    type: 'input',
    inputLabel: '客人货号',
    inputDisabled: true,
    inputValue: '颜色/景色'
  },
  {
    type: 'input',
    inputLabel: '季度',
    inputDisabled: true,
    inputValue: '颜色/景色'
  },
  {
    type: 'button',
    checkboxLabel: '标注指令已结束'
  },
  {
    type: 'button',
    checkboxLabel: '查询标注结束指令'
  }
])
const findData = (data: any) => {
  console.log(data)
}
// 表格数据
const tableData = [
  {
    date: '20230427',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  }
]

const tableHeader = ref([
  {
    label: '客户',
    prop: 'instruction'
  },
  {
    label: '指令',
    prop: 'instruction'
  },
  {
    label: '型体',
    prop: 'shape'
  },
  {
    label: '配色',
    prop: 'shape'
  },
  {
    label: '订单号',
    prop: 'shape'
  },
  {
    label: '预补量',
    prop: 'shape'
  },
  {
    label: '下单日期',
    prop: 'name',
    type: 'select'
  },
  {
    label: '客户交期',
    prop: 'name',
    type: 'select'
  }
])

// 表格数据
const tableHeader1 = ref([
  {
    Multistage: true,
    label: '斩刀试作',

    children: [
      {
        label: '需要'
      },
      {
        label: '完成日期',
        prop: 'z'
      }
    ]
  },
  {
    Multistage: true,
    label: '',
    children: [
      {
        label: '欠料',
        prop: 'customer'
      }
    ]
  },
  {
    Multistage: true,
    label: '主面料',
    children: [
      {
        label: '计划日期'
      },
      {
        label: '实际日期',
        prop: 'shape'
      }
    ]
  }
])

const tableHeader2 = ref([
  {
    Multistage: true,
    label: '冲裁',

    children: [
      {
        label: '冲裁组别'
      },
      {
        label: '裁断当日',
        prop: 'z'
      },
      {
        label: '裁断欠数',
        prop: 'z'
      },
      {
        label: '计划完成',
        prop: 'z'
      },
      {
        label: '实际完成',
        prop: 'z'
      }
    ]
  },
  {
    Multistage: true,
    label: '工艺',
    children: [
      {
        label: '工艺欠数',
        prop: 'customer'
      },
      {
        label: '计划完成',
        prop: 'customer'
      },
      {
        label: '实际完成',
        prop: 'customer'
      }
    ]
  },
  {
    Multistage: true,
    label: '配套',
    children: [
      {
        label: '配套当日'
      },
      {
        label: '配套欠数',
        prop: 'shape'
      }
    ]
  },
  {
    Multistage: true,
    label: '针车',
    children: [
      {
        label: '针车组别'
      },
      {
        label: '当日量产',
        prop: 'shape'
      },
      {
        label: '针车欠数',
        prop: 'shape'
      },
      {
        label: '计划完成',
        prop: 'shape'
      },
      {
        label: '实际完成',
        prop: 'shape'
      }
    ]
  },
  {
    Multistage: true,
    label: '鞋面仓',
    children: [
      {
        label: '库存'
      }
    ]
  },
  {
    Multistage: true,
    label: '大底',
    children: [
      {
        label: '大底厂商'
      },
      {
        label: '当日入库',
        prop: 'shape'
      }
    ]
  },
  {
    Multistage: true,
    label: '成型投料',
    children: [
      {
        label: '成型组别'
      },
      {
        label: '当日投料',
        prop: 'shape'
      },
      {
        label: '投料欠数',
        prop: 'shape'
      },
      {
        label: '计划完成',
        prop: 'shape'
      },
      {
        label: '实际完成',
        prop: 'shape'
      }
    ]
  },
  {
    Multistage: true,
    label: '成型产出',
    children: [
      {
        label: '当日产出'
      }
    ]
  },
  {
    Multistage: true,
    label: '鞋垫',
    children: [
      {
        label: '欠数'
      }
    ]
  },
  {
    Multistage: true,
    label: '成型投料',
    children: [
      {
        label: '当日产出'
      },
      {
        label: '当日投料'
      },
      {
        label: '投料欠数'
      },
      {
        label: '计划完成'
      },
      {
        label: '实际完成'
      }
    ]
  },
  {
    Multistage: true,
    label: '成型产出',
    children: [
      {
        label: '当日产出'
      },
      {
        label: '欠数'
      },
      {
        label: '计划完成'
      },
      {
        label: '实际完成'
      }
    ]
  }
])
</script>

<style lang="less" scoped>
:deep(.ProductionDynamicMainCardBottom .el-input__wrapper) {
  background-color: #fff5eb;
}

.save {
  color: black;
  border: 1px solid #e7e7e7;
  background: #e7e7e7;
}
</style>
